<?php
if(!defined('DCS_ROOT')) {exit('Access Denied');}

class logout {
	function defaultAction(){
		cookiedel('uid');
		cookiedel('username');
		cookiedel('email');
		unset($_SESSION['uid']); 
		$refer = getReferer();
		if (!empty($refer)){
			echo '<script language="javascript">location.href="'.$refer.'";</script>';
		}else{
			echo '<script language="javascript">location.href="/";</script>';
		}
		exit();
	}

}

?>
